<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>
<script type="text/html" id="photos-item-tpl">
    <li id="saved-image{id}">
        <input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
        <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
               style="width: 200px;" title="图片名称">
        <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
             onclick="imagePreviewDialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
    </li>
</script>
<script type="text/html" id="files-item-tpl">
    <li id="saved-file{id}">
        <input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
        <input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
               style="width: 200px;" title="文件名称">
        <a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
        <a href="javascript:uploadOne('文件上传','#file-{id}','file');">替换</a>
        <a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
    </li>
</script>
</head>
<body>
<div class="wrap js-check-wrap">

    <ul class="nav nav-tabs">
        <li><a href="{:url('project/process')}?id={$id}">开发需求确认表</a></li>
        <li><a href="{:url('project/customerChangeOpinion')}?id={$id}">客户变更意见列表</a></li> 
        <li><a href="{:url('project/changeOpinion')}?id={$id}">变更列表</a></li> 
        <li><a href="{:url('project/effectImgConfirm')}?id={$id}">PC效果图确认</a></li> 
        <li><a href="{:url('project/mobileImg')}?id={$id}">移动端效果图确认</a></li> 
        <li class="active"><a href="{:url('project/check')}?id={$id}">验收</a></li> 
        <li><a href="{:url('project/deliver')}?id={$id}">交付文档</a></li> 
    </ul>
    <br>
             
        <div class="row">
            <div class="col-md-12">
               <table class="table table-bordered" style="border: none;text-align:center;">
                    <tr>
                        <td style="font-weight: bold;">ID</td>
                        <td style="font-weight: bold;">需求内容</td>
                        <td style="font-weight: bold;">完成进度</td>
                        <td style="font-weight: bold;">验收状态</td>
                        <td style="font-weight: bold;">验收时间</td>
                    </tr>
                    
                    <foreach item='vo' key='k' name='result'>
                        <tr>
                            <td>{$k+1}</td>
                            <td>{$vo.content}</td>
                            <td>
                                <a href="javascript:;" onclick="changes({$vo.id},{$vo.status1})"><?php
                                    if($vo['status1'] == 2)
                                    {
                                        echo '完成';
                                    }else
                                    {
                                        echo '未完成';
                                    }
                                ?></a>
                            </td>
                            <td><?php if($vo['status'] == 1){ echo '未验收';}else{ echo '验收';}?></td>
                            <td>
                                <?php
                                    if($vo['status'] == 2)
                                    {
                                        echo date('Y-m-d H:i:s',$vo['checkout_time']);
                                    }
                                ?>
                            </td>
                            
                           
                        </tr>
                    </foreach>
                </table>  

                <table class="table table-bordered" style="border: none;width: 620px;">
                    <tr>
                        <th style="width: 120px;">验收意见:</td>
                        <td style="width: 500px;height: 80px;">{$result1.checkout_desc}</td>
                    </tr>
                    <tr>
                        <th style="width: 120px;">记录提交时间:</td>
                        <td style="width: 500px;"><?php echo date('Y-m-d H:i:s',$result1['checkout_time']);?></td>
                    </tr>
                </table>     
            </div>

        </div>
         
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>


</body>
</html>
<script>
     function test_blocked(id)
    {
        openIframeLayer("{:url('project/testBlocked')}?id="+id, '项目测试地址编辑', {
            area: ['40%;', '60%;'],
            btn: ['确定'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }
    function changes(id,status)
    {
        if(status == 1)
        {
            status = 2;
        }else{
            status = 1;
        }
        $.ajax({
            type:'post',
            url : "{:url('project/changeCheckStatus')}",
            data:{
                'id':id,
                'status':status
            },success:function(data)
            {
                window.location.reload();
            }
        })
    }
</script>
